//package com.mrzhou.rabbit.entity;
//
//import com.baomidou.mybatisplus.annotation.TableLogic;
//import com.baomidou.mybatisplus.annotation.TableName;
//import com.fasterxml.jackson.annotation.JsonFormat;
//import com.fasterxml.jackson.annotation.JsonIgnore;
//import com.fasterxml.jackson.databind.annotation.JsonSerialize;
//import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
//import com.mrzhou.core.tool.utils.DateUtil;
//import com.mrzhou.rabbit.config.ElasticsearchIndexConfiguration;
//import lombok.Getter;
//import lombok.Setter;
//import org.springframework.data.elasticsearch.annotations.*;
//import org.springframework.stereotype.Component;
//
//import java.time.LocalDate;
//import java.time.LocalDateTime;
//
///**
// * @author qiang.zhou
// *  当前类暂时交由IOC容器管理, 方便自动构建Elasticsearch索引
// *  当SpringBean初始化完成后会将此Bean从容器中移除,
// *  {@link ElasticsearchIndexConfiguration#postProcessBeanFactory}
// */
//@Getter
//@Setter
//@Component
//@TableName("t_user")
//@Setting(settingPath = "es-settings/elasticsearch.json")
//@Document(indexName = "es_user_index", useServerConfiguration = true, createIndex = false)
//public class User extends BaseEsEntity {
//
//    private static final long serialVersionUID = 1L;
//
//    @Field(type = FieldType.Text, analyzer="pinyin")
//    private String name;
//
//    @Field(type = FieldType.Text, analyzer = "ik_pinyin")
//    private String value;
//
//    private Integer sex;
//
//    /** @Field 设置Elasticsearch的的字段类型 */
//    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "uuuu-MM-dd")
//    private LocalDate birthday;
//
//    @JsonIgnore
//    private String extendData;
//
//    @Field(type = FieldType.Integer)
//    private Integer status;
//
//    @TableLogic
//    @Field(type = FieldType.Integer)
//    private Integer isDelete;
//
//    @Field(type = FieldType.Text)
//    @JsonSerialize(using = ToStringSerializer.class)
//    private Long createUser;
//
//    @Field(type = FieldType.Text)
//    private String createDept;
//
//    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "uuuu-MM-dd HH:mm:ss")
//    private LocalDateTime createTime;
//
//    @Field(type = FieldType.Text)
//    @JsonSerialize(using = ToStringSerializer.class)
//    private Long updateUser;
//
//    @Field(type = FieldType.Date, format = DateFormat.custom, pattern = "uuuu-MM-dd HH:mm:ss")
//    private LocalDateTime updateTime;
//
//}
